package cn.webrx;

import java.util.Arrays;
import java.util.Random;

public class Arr21 {
    public static void main(String[] args) {
        Random rand = new Random();
        Integer[] ns = new Integer[5];
        Arrays.fill(ns,5);
        System.out.println(ns);
        System.out.println(ns.length);
        System.out.println(Arrays.toString(ns));

        //1-3 下标元素设置为66,不包括3
        Arrays.fill(ns,1,3,66);
        System.out.println(Arrays.toString(ns));

        Arrays.fill(ns,rand.nextInt(1,101));
        System.out.println(Arrays.toString(ns));

        System.out.println(Arrays.deepToString(ns));

        for(int i=0;i<ns.length;i++){
            ns[i] = rand.nextInt(1,101);
        }
        System.out.println(Arrays.toString(ns));

    }
}
